<template>
  <div class="login ">
    {{$t('system.coming')}}
  </div>
</template>

<script>
export default {
  name: "Coming",
  components:{
  },
  data() {
    return {
      lang: 'zh'
    };
  },
  watch: {
  },
  mounted() {
    this.lang = this.$route.query.lang
    if (this.lang){
      this.setLang()
    }
  },
  beforeCreate() {
    // console.log(navigator.language, '----------------')
    // if (!getCookie('lang_setting')){
    //   this.lang = navigator.language
    //   this.setLang()
    // }
  },
  created() {
  },
  methods: {
    setLang(){
      if((this.lang).toLowerCase().includes('ja')) {
        this.$i18n.locale = 'ja'
        this.$store.dispatch('app/setLanguage', 'ja')
      }else if((this.lang).toLowerCase().includes('en')) {
        this.$i18n.locale = 'en'
        this.$store.dispatch('app/setLanguage', 'en')
      }else{
        this.$i18n.locale = 'zh'
        this.$store.dispatch('app/setLanguage', 'zh')
      }
    }

  }
};
</script>

<style rel="stylesheet/scss" lang="scss">
.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  /*background-image: url("../assets/images/fengche.jpg");*/
  background-size: cover;
}

</style>
